home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / FALCON / ACC / OUTLINE.ACC / PTBIND.C < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-10  |  2.8 KB  |  149 lines

  1. /*==========================================================================
  2.  * FILE: PTBIND.C
  3.  *==========================================================================
  4.  * DATE: October 22, 1990
  5.  * Description: Bindings for new FSM GDOS calls
  6.  */
  7.  
  8.  
  9. /* INCLUDE FILES
  10.  *==========================================================================
  11.  */
  12. #include <sys\gemskel.h>
  13.  
  14.  
  15. /* PROTOTYPES
  16.  *==========================================================================
  17.  */
  18. void  stuffptr( int *srce, long *dest );
  19.  
  20.  
  21. /* DEFINES
  22.  *==========================================================================
  23.  */
  24.  
  25. /* EXTERNALS
  26.  *==========================================================================
  27.  */
  28. void vdi( void );
  29.  
  30.  
  31. /* GLOBALS
  32.  *==========================================================================
  33.  */
  34.  
  35.  
  36.  
  37. /* FUNCTIONS
  38.  *==========================================================================
  39.  */
  40.  
  41.  
  42. /* vst_arbpt()
  43.  *==========================================================================
  44.  */
  45. int 
  46. vst_arbpt( int handle, int point, int *chwd, int *chht, int *cellwd, int *cellht )
  47. {
  48.    contrl[0] = 252;
  49.    contrl[1] = 0;
  50.    contrl[3] = 1;
  51.    contrl[6] = handle;
  52.    intin[0] = point;
  53.    vdi();
  54.    *chwd    = ptsout[0];
  55.    *chht    = ptsout[1];
  56.    *cellwd  = ptsout[2];
  57.    *cellht  = ptsout[3];
  58.    return(intout[0]);
  59. }
  60.  
  61.  
  62.  
  63. /* v_savecache()
  64.  *==========================================================================
  65.  */
  66. int 
  67. v_savecache( int handle, char *filename )
  68. {
  69.    int i = 0;
  70.  
  71.    while (*filename)
  72.     intin[i++] = *filename++;
  73.  
  74.    contrl[0] = 249;
  75.    contrl[1] = 0;
  76.    contrl[3] = i;
  77.    contrl[6] = handle;
  78.  
  79.    vdi();
  80.  
  81.    return( intout[0] );
  82. }
  83.  
  84.  
  85. /* v_loadcache()
  86.  *==========================================================================
  87.  */
  88. int
  89. v_loadcache( int handle, char *filename, int mode )
  90. {
  91.    int i = 0;
  92.  
  93.    intin[i++] = mode;
  94.  
  95.    while (*filename)
  96.     intin[i++] = *filename++;
  97.  
  98.    contrl[0] = 250;
  99.    contrl[1] = 0;
  100.    contrl[3] = i;
  101.    contrl[6] = handle;
  102.  
  103.    vdi();
  104.  
  105.    return( intout[0] );
  106. }
  107.  
  108.  
  109.  
  110.  
  111.  
  112. /* v_flushcache()
  113.  *==========================================================================
  114.  */
  115. int  
  116. v_flushcache( int handle )
  117. {
  118.    contrl[0] = 251;
  119.    contrl[1] = 0;
  120.    contrl[3] = 1;
  121.    contrl[6] = handle;
  122.  
  123.    vdi();
  124.    return( intout[0] );
  125. }
  126.  
  127.  
  128.  
  129.  
  130. /* vqt_cachesize()
  131.  *==========================================================================
  132.  * Returns the largest block size availalbe in each of the two fsm caches.
  133.  */
  134. void
  135. vqt_cachesize( int handle, int which_cache, long *size )
  136. {
  137.   contrl[0] = 255;
  138.   contrl[1] = 0;
  139.   contrl[3] = 1;
  140.   contrl[6] = handle;
  141.   
  142.   intin[0]  = which_cache;
  143.   
  144.   vdi();
  145.   
  146.   stuffptr( &intout[0], size );
  147. }
  148.  
  149.